$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER OLD_MODE
      INTEGER FG_GETMODE, FG_TESTMODE

      CALL FG_INITPM
      OLD_MODE = FG_GETMODE()

      IF (FG_TESTMODE(3,1) .EQ. 1) THEN
         CALL FG_SETMODE(3)
      ELSE IF (FG_TESTMODE(7,1) .EQ. 1) THEN
         CALL FG_SETMODE(7)
      ELSE
         STOP 'This program requires an 80-column display.'
      END IF

      CALL FG_CURSOR(0)

      CALL FG_SETCOLOR(15)
      CALL FG_TEXT('Hello, world.',13)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
